Basic Candle STick Chart

Plotly plot_ly example with Apple Price Data from Yahoo Finance using tidyquant R package:

library(plotly)
library(tidyquant)
getSymbols("AAPL", from = '2020-01-01',
           to = "2021-04-02",warnings = FALSE,
           auto.assign = TRUE)
## [1] "AAPL"
df <- data.frame(Date=index(AAPL),coredata(AAPL))

fig <- df %>% plot_ly(x = ~Date, type="candlestick",
          open = ~AAPL.Open, close = ~AAPL.Close,
          high = ~AAPL.High, low = ~AAPL.Low) 
fig <- fig %>% layout(title = "Basic Candlestick Chart",
         xaxis = list(rangeslider = list(visible = F)))

fig